//
//  PXAlertView.h
//  PXAlertViewDemo
//
//  Created by Alex Jarvis on 25/09/2013.
//  Copyright (c) 2013 Panaxiom Ltd. All rights reserved.
//

#import <UIKit/UIKit.h>



/**
 *  选择项回调
 *
 *  @param dict 选择数据
 *  @param row  回调行
 */
typedef void (^PXAlertViewQueueBlock)(NSDictionary *dict ,int row);


@protocol PXAlertViewDelegate
@optional
-(void)getselect:(NSString *)getselect mark:(int)mark row:(int)row;
@end


@interface PXAlertView : UIView<UITableViewDataSource,UITableViewDelegate>
{

        id<PXAlertViewDelegate> deleage;

}

/**
 *  回调
 */
@property(nonatomic,copy)PXAlertViewQueueBlock   viewblock;

@property(assign,nonatomic)id<PXAlertViewDelegate> delegate;
@property (nonatomic, getter = isVisible) BOOL visible;
@property (nonatomic) NSInteger mark;
+ (PXAlertView *)showAlertWithTitle:(NSString *)title;

+ (PXAlertView *)showAlertWithTitle:(NSString *)title
                            message:(NSString *)message;

+ (PXAlertView *)showAlertWithTitle:(NSString *)title
                            message:(NSString *)message
                         completion:(void(^) (BOOL cancelled))completion;

+ (PXAlertView *)showAlertWithTitle:(NSString *)title
                            message:(NSString *)message
                        cancelTitle:(NSString *)cancelTitle
                         completion:(void(^) (BOOL cancelled))completion;

+ (PXAlertView *)showAlertWithTitle:(NSString *)title
                            message:(NSString *)message
                        cancelTitle:(NSString *)cancelTitle
                         otherTitle:(NSString *)otherTitle
                         completion:(void(^) (BOOL cancelled))completion;

+ (PXAlertView *)showAlertWithTitle:(NSString *)title
                            message:(NSString *)message
                        cancelTitle:(NSString *)cancelTitle
                         otherTitle:(NSString *)otherTitle
                        contentView:(UIView *)view
                         completion:(void(^) (BOOL cancelled))completion;
+ (PXAlertView *)showAlertWithTitle:(NSString *)title
                            message:(NSString *)message
                        cancelTitle:(NSString *)cancelTitle
                         otherTitle:(NSString *)otherTitle
                          tableview:(NSArray *)arr
                         completion:(void(^) (BOOL cancelled))completion;
-(void)dismiss:(id)sender;
-(id)initAlertWithTitle:(NSString *)title
  message:(NSString *)message
  cancelTitle:(NSString *)cancelTitle
  otherTitle:(NSString *)otherTitle
  contentView:(UIView *)contentView
 completion:(void(^) (BOOL cancelled))completion
   tableview:(NSArray *)arry;
- (void)show;
- (void)_show;
- (void)hide;

@end
